package com.diaosidadui.array;

public class Test {
    public static void main(String[] args) {

        String[] arr1 ={"aa","bb","cc","dd"};
        int[] arr2 = {11,22,33,44,55};
        int [] arr3 =new int[10];
        int [] arr4 =new int[arr3.length];
        for (int i = 0; i < arr3.length; i++) {
            arr3[i]=i+1;
        }
        for (int i = arr3.length - 1,k=0; i >= 0; i--) {
            arr4[k]=arr3[i];
                    k++;
        }
        for (int i = 0; i < arr4.length; i++) {
            System.out.print(arr4[i]+" ");
        }
        String s = "abcdefg";
        char[] cArr = s.toCharArray();
        char[] cArr2 =new char[cArr.length];
        StringBuilder chSb = new StringBuilder();
        for (int i= s.length()-1,k =0; i >=0 ; i--) {
            cArr2[k] = cArr[i];
            chSb.append(cArr2[k]);

        }
        System.out.println(chSb);

    }

}
